package cn.com.oceansoft.business.sys.persistence;

import cn.com.oceansoft.business.base.entity.Query;
import cn.com.oceansoft.business.sys.entity.SysRole;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 系统角色数据库操作接口
 *
 * @author: chenw
 * @time: 2014-5-14 下午 15:19
 */
@Repository
public interface ISysRoleMapper {

    List<SysRole> findPageByCondition(Query query);

    SysRole findById(int id);

    int update(SysRole sysRole);

    int save(SysRole sysRole);

    int countUserRoleRelationByRoldId(int roleId);

    int countRoleResourceRelationByRoldId(int roleId);

    int deleteRoleById(int roleId);

    List<SysRole> findRoleByUserId(String userId);
}
